home *** CD-ROM | disk | FTP | other *** search
- The prolog listing FRAMES.PRO will compile and run under PDPROLOG. The major
- limitation of PDPROLOG in this context is that it does not support
- floating-point arithmetic. We have truncated the value of pi in the
- cylinder cross-sectional area routine to 3. An alternative approach would
- be to use, e.g., 314 and mentally divide each area and volume by 100 to
- obtain an answer to two decimal points. In any case, when you enter values
- from the keyboard for, e.g., the Radius, you must use integer values if
- you are running PDPROLOG.
-
- To invoke the program, boot PDPROLOG and type:
- consult('frames').
- After the program has compiled, type:
- frame_put(cylinder1,radius,2).
- frame_put(cylinder1,height,10).
- etc.
-
- In order to see the affect of entering a value for the radius or height,
- you may either type:
- listing(cylinder1).
- (Don't forget the period at the end of commands).
- Or, you may use the frame_get predicate:
- frame_get(cylinder1,X,Y).
- X and Y must be capital letters. Initial caps indicate variable names in
- Prolog.
-
- To change values for cylinder1, you may use either
- frame_remove(cylinder1,radius). [or
- frame_remove(cylinder1,name-of-slot-to-be-deleted).] followed by
- frame_put(ENTER NEW VALUE AS EXPLAINED FOR FRAME_PUT ABOVE),
- or frame_replace(cylinder1,radius,4). or whatever value you want changed.
- This form allows the new value to be entered in one step, but is otherwise
- equivalent to frame_remove folloed by frame_put.
-
- To end a pdprolog session and return to the operating system level,
- enter "exitsys." (without the quotes, of course).
-
- LISTING2.PRO AND LISTING3.PRO ARE NOT STAND-ALONE PROGRAMS. THEY CANNOT BE
- EXECUTED.
-
- The current version of pdprolog, pdprolog 1.8 is included on this disk.
- Full documentation and other sample prolog programs are available for
- downloading from BYTEnet Listings (617)861-9764 or from BIX.
-
- PDPROLOG.EXE IS A PC-DOS OR MS-DOS PROGRAM ONLY.
-
- lable for
- downloading from BYTEnet Listings (617)861-9764 or from BIX.
-
- PDPROLOG.EXE IS A PC-DOS OR MS-